<!-- Contact Us index -->

<head>
  <meta name="layout" content="main" />
  <title>Contact Us</title>
</head>

<body>
  <div class="body">
    <h1>Contact Us</h1>
    <g:render template="/common/contact" />
    <br />
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${contactUs}">
      <div class="errors">
        <g:renderErrors bean="${contactUs}" as="list" />
      </div>
    </g:hasErrors>
    <g:form action="send">
      <div class="dialog">
        <table>
          <tbody>
            <tr class="prop">
              <td valign="top" class="name"><label for="name">Name:</label></td>
              <td valign="top" class="value ${hasErrors(bean:contactUs,field:'name','errors')}">
                <input type="text" id="name" name="name" value="${contactUs?.name?.encodeAsHTML()}"/>
              </td>
            </tr>

            <tr class="prop">
              <td valign="top" class="name"><label for="email">Email Address:</label></td>
              <td valign="top" class="value ${hasErrors(bean:contactUs,field:'email','errors')}">
                <input type="text" id="email" name="email" value="${contactUs?.email?.encodeAsHTML()}"/>
              </td>
            </tr>

            <tr class="prop">
              <td valign="top" class="name"><label for="subject">Subject:</label></td>
              <td valign="top" class="value ${hasErrors(bean:contactUs,field:'subject','errors')}">
                <input type="text" id="subject" name="subject" value="${contactUs?.subject?.encodeAsHTML()}"/>
              </td>
            </tr>

            <tr class="prop">
              <td valign="top" class="name"><label for="message">Message:</label></td>
              <td valign="top" class="value ${hasErrors(bean:contactUs,field:'message','errors')}">
                <g:textArea id="message" name="message" value="${contactUs.message}" rows="10" />
              </td>
            </tr>

            <tr class='prop'>
              <td valign='bottom' class='name'><label for='captcha'>Enter Code: </label></td>
              <!--<td valign='top' class='name'>-->
              <td valign="top" class="value ${hasErrors(bean:contactUs,field:'captcha','errors')}">
                <input type="text" name="captcha" size="8"/>
                <img src="${createLink(controller:'captcha', action:'index')}" align="absmiddle"/>
              </td>
            </tr>
          </tbody>
        </table>
      </div>

      <div class="buttons">
        <span class="formButton">
          <input class='save' type="submit" value="Send"></input>
        </span>
      </div>

    </g:form>
  </div>
</body>
